package com.xiaochen.order.controller;

import com.xiaochen.model.vo.common.Result;
import com.xiaochen.model.vo.common.ResultCodeEnum;
import com.xiaochen.model.vo.h5.TradeVo;
import com.xiaochen.order.service.OrderInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Tag(name = "用户订单接口")
@RestController
@RequestMapping("/api/order/orderInfo")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;

//    @GetMapping("/auth/findOrderInfoList")
//    public Result

    // 确认下单
    @Operation(summary = "确认下单")
    @GetMapping("/auth/trade")
    public Result trade(){
        TradeVo tradeVo = orderInfoService.trade();
        return Result.build(tradeVo, ResultCodeEnum.SUCCESS);
    }
}
